package com.highspeed.bdk.service.deploy;

import com.bianmaba.spring.data.jpa.repository.support.ExtendedRepository;
import com.highspeed.bdk.bean.entity.deploy.Server;
import com.highspeed.bdk.repository.deploy.ServerRepository;
import com.highspeed.bdk.service.base.BdkBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by chenjiabin on 2018/3/23.
 */
@Service
@Transactional
public class ServerService extends BdkBaseService<Server, Integer> implements IServerService {

    @Autowired
    private ServerRepository serverRepository;

    @Override
    public ExtendedRepository<Server, Integer> getRepository() {
        return serverRepository;
    }

    @Override
    public List<Server> findServersByUser(String user) {
        return serverRepository.findServersByUser(user);
    }
}
